<template>
    <% for(var i = 0;i< data.data.length;i++){ %>
    <% var item = data.data[i]; %>
        <%if(item.cover){%>
        <img name="{{data.name}}" style="position: absolute;left: {{item.left}}px;top: {{item.top}}px;width: {{item.width}}px;height: {{item.height}}px;" src="{{item.cover}}" alt="">
        <%}else{%>
        <div onclick="call{{data.onClick(i)}}" name="{{data.name}}" style="line-height: {{item.height}}px;background: {{item.background}};position: absolute;left: {{item.lefe}}px;top: {{item.top}}px;color: {{(item.color || data.color)}};width: {{item.width}}px;height: {{item.height}}px;font-size: {{(item.fontSize||26)}}px;text-align: center;">
            {{item.title||item.name}}
        </div>
        <%}%>
    <%}%>
</template>
<script>


    (function (){
        return {
            left:940,
            top:30,
            width:100,
            height:80,
            name:"top",
            tpl:"bottomTpl",
            // background: "images/top-menu.png",
            listItem:{
                "row":1,
                "col":1,
                "width":131,
                "height":40,
                "space_left":1.5,
                "padding_top":0,
                "padding_left":0
            },
            listFocus:null,
            data:[],
            create:function(){
                // this.dom.style.color = "#007bc7"
            },
            updated:function(){

                this.listFocus = new Focus({
                    containner:this.dom,
                    focusFolder:"images/focus20",
                    td:16,
                    padding_left:6,
                    padding_top:6,
                    spacing_left:6,
                    spacing_top:6
                });

            },
            itemFocusOn:function (item) {
                item.dom.style.background = "#007bc7"
                item.dom.style.color = "#ffffff";
                this.listFocus.show();
                this.listFocus.defaultFocusChange(item);
            },
            onClick:function(){

            },
            itemFocusOut:function (item) {
                this.listFocus.hidden();

                item.dom.style.color = "#000000";
                item.dom.style.background = "#ffffff"
            },
            enter:function (item) {
                if(item.url){
                    pageRedirectTo(item.url);
                }
            }
        }
    })()
</script>